<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String textPath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>登录页面</title>
		<link rel="stylesheet" type="text/css" href="<%=textPath %>/ligerUI/lib/ligerUI/skins/Aqua/css/ligerui-all.css">
		<script src="<%=textPath %>/ligerUI/lib/jquery/jquery-1.9.0.min.js"></script>
	    <script src="<%=textPath %>/ligerUI/lib/ligerUI/js/ligerui.all.js"></script>
    
	</head>
	<body>
    <div style="margin-left:50px;margin-top:10px">
	
	
	日志级别:<select id="level">
	<option value="INFO">INFO</option>
	<option value="ERROR">ERROR</option>
    <option value="WARN">WARN</option>
    <option value="DEBUG">DEBUG</option>
    <option value="">NULL</option>
    </select>
    
    <input id="date" />
    
          信息：<input id="msg" size="42"/>
   <br>
           用户：<input id="user" size="42"/>
    <br>

    <input type="submit" value="查询" id="ok" class="l-button l-button-submit" >
	</div>
	    <div id="log_list"></div>
	</body>
	<script>
		var grid;
		var path = '<%=textPath %>';

		$(function(){
			
			$("#level").ligerComboBox({width:300}); 
			$("#date").ligerDateEditor({ showTime: true, label: '时间', labelWidth: 38,width:300, labelAlign: 'left' });
			grid = $("#log_list").ligerGrid({
			    columns: [
			       	{display: '级别', name: 'level', align: 'left', width: '10%' } ,
			       	{display: '日期', name: 'date', minWidth: '20%' },
			       	{display: '信息', name: 'msg', width: '49%', align: 'left' },
			       	{display: '用户', name: 'user', width: '20%', align: 'left' }
					],
			     url: path+'/log/list',
			     pageSize: 20,
			     sortName: 'CustomerID',
			     width: '100%',
			     height: '99%',
			     checkbox: false,
			});
			
			$("#ok").click(function(){
				
				var level = $("#level").val();
				var date = $("#date").val();
				var msg = $("#msg").val();
				var user = $("#user").val(); 
			
				grid.setOptions({
					parms:{
						level:level,
						date:date,
						msg:msg,
						user:user
					}
				});
				grid.reload(true);
			});
		})
	</script>
</html>